local smtp = require("socket.smtp")

from = "<luasocket@example.com>"

rcpt = {
  "<fulano@example.com>",
  "<sicrano@example.com>"
}

mesgt = {
  headers = {
    to = "Fulano da Silva <fulano@example.com>",
    cc = '"Beltrano F. Nunes" <beltrano@example.com>',
    subject = "My first message"
  },
  body = "I hope this works. If it does, I can send you another 1000 copies."
}

r,e= smtp.send{
    server="smtp.126.com",
	user="youmail@126.com",
    password="  ******",
    from=from,
    to=rcpt,
    msg=mesgt
}

print(r)

